package com.wangyk.rabbitmqconsole.message;

import org.springframework.cloud.stream.annotation.Input;
import org.springframework.cloud.stream.annotation.Output;
import org.springframework.messaging.MessageChannel;
import org.springframework.messaging.SubscribableChannel;

/**
 * 使用Stream来操作RabbitMQ
 * 专门为MQ服务，支持RabbitMQ和Kafka
 * */
public interface StreamClient
{
    String INPUT="myStreamMessage";

    /**
     * 必须要有@Input注解
     * */
    //@Input("myStreamMessage")
    SubscribableChannel subscribableChannel();

    /**
     * 必须要有@Output注解
     * */
    @Output(StreamClient.INPUT)
    MessageChannel messageChannel();
}
